<div class="land-wrap">
	<a class="land-logo" href=""></a>
	<form action="" method="post">
		<div class="login-con">
			<div class="login-mask"></div>
			<div class="login-box">
				<div class="login">
					<div class="user clearfix">
						<div class="ipt-user show-placeholder">
							<em></em>
							<label for="username" class="placeholder">请输入用户名</label>
							<input type="text" name="username" id="username" autocomplete="off" title="请输入帐号">
							<div class="user-err"></div>
						</div>
					</div>
					<div class="pwd clearfix">
						<div class="ipt-pwd show-placeholder">
							<em></em>
							<label for="password" class="placeholder">请输入密码</label>
							<input type="password" name="password" id="password" autocomplete="off" title="请输入密码">
							<div class="pwd-err"></div>
						</div>
					</div>
					<div class="f-pwd">
						<input type="checkbox" class="chose-f" id="remember">
						<span>记住此密码</span>
						<a href="/admin/users/change_pwd">忘记密码</a>
					</div>
					<div class="login-btn">
						<a href="javascript:;">登陆</a>
					</div>
					<div class="ch-page">
						<span>没有账户?</span>
						<a href="/admin/users/sign_up">立即注册</a>
					</div>
				</div>
			</div>
		</div>
	</form>
</div>

<script>
	$(function() {
		var ls = window.localStorage;
  		if (ls) {
  			var s =  JSON.parse(ls.getItem("isSave"));
  			var obj =  JSON.parse(ls.getItem("user"));
  		};
  		if (s) {
  			$("#username").val(obj.username);
  			$("#password").val(obj.password);
  			$("#remember").prop("checked", true);
  		};
		var form_buid = new formBuild(".login-con input", ".user-err", ".pwd-err", 0);

		//键盘enter事件
	    document.onkeydown=function(event){
	        var e = event || window.event || arguments.callee.caller.arguments[0];
	        if(e && e.keyCode==27){ // 按 Esc
	            //要做的事情
	        }
	        if(e && e.keyCode==113){ // 按 F2
	            //要做的事情
	        }
	        if(e && e.keyCode==13){ // enter 键
	            form_buid._do_login();
	        }
	    };
	});
</script>
